<template>
  <div class="app">
    <Editor v-model="state" />
  </div>
</template>

<script>
import data from './data.json'
import { ref, provide } from 'vue'
import Editor from './packages/editor'
import { regiterConfig as config } from './utils/editor-config'
export default {
  components: {
    Editor,
  },
  setup() {
    const state = ref(data)
    provide('config', config)
    return {
      state
    }
  }
}
</script>

<style>
.app {
  position: fixed;
  top: 20px;
  left: 20px;
  right: 20px;
  bottom: 20px;
}
</style>
